<php>
$stype='enable_Y';
if( !empty($plugin_bindmobile) )$pageData = service('Order')->search4User($stype,20,$plugin_bindmobile);
if(empty($pageData)||empty($pageData['data'])){
</php>
	<div style="width:100%;text-align:center;margin-top:15px;">
		<php>$alert_message="暂无符合条件的订单！";
		</php>
		<include file="../Public/alert_box.html" />
	</div>
<php>
}else{
	foreach($pageData['data'] as $vo1){
		if(!in_array($vo1['shelf_id'],$ary_shelfid))$ary_shelfid[]=$vo1['shelf_id'];
	}

	if(!empty($ary_shelfid))$goods_title = service('Product')->select4UserPRelInfoByIds($ary_shelfid);
	$pageData['goods_title']=$goods_title;
</php>
<script type="text/javascript">
    //鼠标移动表格效果
    $(document).ready(function(){
    	inittable();
    });
    
</script>
  			<div class="list" style="margin-top:5px">
			  	<table cellspacing="0" cellpadding="0" border="0" width="100%" id="order_list">
					<tbody>
					  <tr rel="order_title">
					    <th style="text-align: center;">订单状态</th>
					    <th style="text-align: center;" class="line_l">商品名称</th>
					    <th style="text-align: center;" class="line_l">购买数量</th>
					    <!--  
					    <th style="text-align: center;" class="line_l">获得积分</th>
					    -->
					    <th style="text-align: center;" class="line_l">订单金额</th>
					    <th style="text-align: center;" class="line_l">支付状态</th>
					    <th style="text-align: center;" class="line_l">操作</th>
					  </tr>
					  <volist id="vo" name="pageData['data']">
						  <tr rel="order_{$vo['id']}">
						 		<td style="text-align: center;">
						       	<php>if($vo['enable']=='Y'){</php>
						       		有效
						       	<php>}else{</php>
						       		无效，原因：
						       	<php>}</php>
						       	</td>
						       	
						       	<td><a href="{:U('plugin://gift/show',array('shelfid'=>$vo['shelf_id']))}">{$pageData['goods_title'][$vo['shelf_id']]['goods_title']}</a></td>
						       	<td style="text-align: right;">{$vo['quantity']}&nbsp;件</td>
						       	<!-- <td style="text-align: right;">{$vo['gain_credit']}</td> -->
						       	<td style="text-align: right;">{:formatMoney($vo['paid_money'])}</td>
						       	<td style="text-align: center;">{:payStateDesc($vo['pay_state'])}</td>
						       	
						      	<td style="text-align: center;">
						      		<span style="cursor: pointer;"  onclick="showOrderDetail( '{$vo['id']}' );">详情</span>
						      		<php>if($vo['pay_state']!='pay'){</php>
						      		&nbsp;&nbsp;
						      		<span style="cursor: pointer;" callback="ajxDeleteOrder('{$vo['id']}')" onclick="ui.confirm(this,'确认删除该订单记录么？');">删除</span>
						      		<php>}</php>
						      	</td>
						  </tr>
					  </volist>
					</tbody>
				  	</table>
			  </div>
			  <div id="clear"></div>
			  <div id="show_order_page">
				  <div class="page_box">{$pageData['html']}</div>
			  </div>

<php>}</php>
<input type="hidden" id="stype" value="{$stype}"><!-- 用于记录查看的积分类型 -->